const WebSocket = require("ws");

const server = new WebSocket.Server({ port: "8081" });

server.on("connection", (socket) => {
  console.log("a ws user connected");

  socket.on("message", (message) => {
    socket.send(`Got that! ${message}`);
  });
});
